package com.jemmyee.pizza.service;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.ICostCylinderDao;
import com.jemmyee.pizza.entity.CostCylinder;

@Repository("costCylinderService")
public class CostCylinderServiceImpl implements ICostCylinderService<CostCylinder>{

	private static final Log log = LogFactory.getLog(CostCylinderServiceImpl.class) ;
	
	@Autowired
	private ICostCylinderDao costCylinderDao ;
	
	public void delete(CostCylinder entity) {
		costCylinderDao.delete(entity) ;
		
	}

	public void deleteAll(List<CostCylinder> list) {
		costCylinderDao.deleteAll(list);
		
	}

	public void deleteById(Serializable id) {
		costCylinderDao.deleteById(id) ;
		
	}

	public List<CostCylinder> findAll() {
		return costCylinderDao.findAll(new CostCylinder());
	}

	public List<CostCylinder> findByCriteria(DetachedCriteria criteria) {
		return costCylinderDao.findByCriteria(criteria);
	}

	public CostCylinder findById(Serializable id) {
		return costCylinderDao.findById(id);
	}

	public List<CostCylinder> findByProperty(String propertyName, Object value) {
		return costCylinderDao.findByProperty(new CostCylinder(), propertyName, value);
	}

	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex, String order) {
		return costCylinderDao.findPageByCriteria(detachedCriteria, pageSize, startIndex, order);
	}

	public void save(CostCylinder entity) {
		costCylinderDao.save(entity) ;
	}

	public void update(CostCylinder entity) {
		costCylinderDao.update(entity) ;
	}

}
